Skip to content

docs: fix broken toctree, refresh API reference, and clean up references#680

Merged
FabianHofmann merged 4 commits into
masterfrom
docs/reorganize-and-update
May 15, 2026
Merged

docs: fix broken toctree, refresh API reference, and clean up references#680
FabianHofmann merged 4 commits into
masterfrom
docs/reorganize-and-update

Conversation

@FBumann
Copy link
Copy Markdown
Collaborator

@FBumann FBumann commented May 13, 2026

Summary

A docs cleanup pass covering correctness issues found during a thorough review:

  • Broken toctreeindex.rst listed coordinate-alignment but no .rst/.nblink existed; added doc/coordinate-alignment.nblink pointing to the existing example notebook.
  • API reference drift (api.rst):
    • Added the five solver classes that were missing despite being advertised: COPT, Knitro, MindOpt, PIPS, cuPDLPx.
    • Exposed top-level helpers: align, merge, options, EvolvingAPIWarning, PerformanceWarning.
    • Added recently-introduced Model methods (add_sos_constraints, reformulate_sos_constraints, compute_infeasibilities, format_infeasibilities) and Variable methods (to_linexpr, fix/unfix, relax/unrelax).
    • New sections for QuadraticExpression, Objective, and RemoteHandler.
    • Removed duplicate Variables.integers entry; fixed "under the hook""under the hood".
  • contributing.rst — replaced the stale Black reference with ruff, corrected the .nblink example (proper JSON, right path, indentation that was breaking pygments), and used pre-commit run --all-files.
  • benchmark.rst — rendered objective read as a product of two variables (nonlinear); fixed to the actual linear benchmark 2x + y with x − y ≥ i−1, verified against benchmark/scripts/benchmark_linopy.py.
  • prerequisites.rst — added SCIP, gave MOSEK a description, removed dangling " -" after MindOpt, dropped the outdated HiGHS-platforms claim, and clarified what linopy[solvers] actually pulls in (verified against pyproject.toml).
  • conf.py + index.rst — bumped copyright to 2026, fixed "contnuous" typo.

Also bundled (already on the branch): silencing HiGHS console output in the tutorial notebooks.

Test plan

  • sphinx-build -b html doc /tmp/out runs clean for the changed files (no new warnings introduced).
  • Render the built site locally and spot-check the new API sections (Top-level helpers, QuadraticExpression, Objective, Remote solving, and the additional solver pages).
  • Confirm coordinate-alignment shows up in the rendered toctree.

🤖 Generated with Claude Code

@FabianHofmann Did you mean to not include the coordinate-alignment notebook in the docs? Happy to remove it until we finish Arithmetics milestone

FBumann and others added 4 commits May 11, 2026 15:09
HiGHS prints a banner + progress lines to the Python REPL on every
m.solve() call by default.  In a tutorial that calls solve many times,
this drowns the actual lesson in solver chatter.  Pass output_flag=False
(a HiGHS solver option forwarded via **solver_options) to suppress it.

Touches the four notebooks where solver_name="highs" is the only solver
invoked:

- create-a-model.ipynb
- create-a-model-with-coordinates.ipynb
- manipulating-models.ipynb (9 solves)
- transport-tutorial.ipynb

Left alone:
- infeasible-model.ipynb (uses Gurobi, kwarg is OutputFlag there;
  also showing solver feedback may be pedagogically relevant for
  infeasibility detection).
- solve-on-remote.ipynb / solve-on-oetc.ipynb (remote handler manages
  its own logging).
- piecewise-*.ipynb (already addressed in #677).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extends the log-silencing scope to the two piecewise tutorials, which
together call m.solve() nine times.  Same transformation as the other
notebooks — output_flag=False as a HiGHS-specific kwarg forwarded via
**solver_options.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…-logs

# Conflicts:
#	examples/piecewise-inequality-bounds.ipynb
#	examples/piecewise-linear-constraints.ipynb
- Add doc/coordinate-alignment.nblink so the index.rst toctree entry
  resolves to examples/coordinate-alignment.ipynb.
- Update api.rst to match the current public API: add the missing
  solver classes (COPT, Knitro, MindOpt, PIPS, cuPDLPx), expose
  top-level helpers (align, merge, options, EvolvingAPIWarning,
  PerformanceWarning), add the missing Model methods
  (add_sos_constraints, reformulate_sos_constraints,
  compute_infeasibilities, format_infeasibilities), add Variable
  methods (to_linexpr, fix/unfix, relax/unrelax), add sections for
  QuadraticExpression, Objective, and RemoteHandler, remove the
  duplicate Variables.integers, and fix the "hook" -> "hood" typo.
- contributing.rst: replace stale Black reference with ruff, correct
  the nblink example (proper JSON, right path, fixed RST indentation
  that was breaking pygments), and use pre-commit run --all-files.
- benchmark.rst: fix the rendered objective, which read as a product
  of two variables; corrected to the actual linear benchmark
  (2x + y with x - y >= i-1, matching benchmark_linopy.py).
- prerequisites.rst: add SCIP, give MOSEK a description, drop the
  dangling "-" after MindOpt, remove the outdated HiGHS-platforms
  claim, and clarify what the [solvers] extra actually pulls in.
- conf.py + index.rst: bump copyright to 2026 and fix the
  "contnuous" typo on the landing page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@FabianHofmann
Copy link
Copy Markdown
Collaborator

@FBumann coordinate alignment is definitely wanted in the docs. can have a look at the pr later today

@FBumann FBumann marked this pull request as ready for review May 13, 2026 11:07
@FBumann
Copy link
Copy Markdown
Collaborator Author

FBumann commented May 13, 2026

There is a folow up that does the heavy lifting here: #681

@FabianHofmann FabianHofmann merged commit 001e5c9 into master May 15, 2026
22 checks passed
@FabianHofmann FabianHofmann deleted the docs/reorganize-and-update branch May 15, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants